<template>
<div>
  <span class="display-inline-block"> 异动学期: {{schoolTerm}} </span>
  <span class="display-inline-block"> 异动类型: {{abnormalName}} </span>
</div>
</template>

<script>
import Calendars from "common/src/api/calendars.js"
import {
  getAbnormalList
} from "common/src/api/studentinfo";
export default {
  props: ['content'],
  data(){
    return {
      schoolTerm:'',
      abnormalName: ''
    }
  },
  created: function(){
    Calendars.searchCalendarList({
      pageNum_: 1,
      pageSize_: 1000
    }).then(res => {
      for (const data of res.data.list) {
        if((','+this.content.schoolTermIds+',').indexOf(',' + data.id + ',') != -1){
          this.schoolTerm += data.fullName + ' ';
        }
      }
    });
    getAbnormalList({
      pageNum_: 1,
      pageSize_: 1000
    }).then(res => {
      for (const data of res.data.list) {
        if(this.content.abnormalTypeId == data.id){
          this.abnormalName = data.className;
        }
      }
    });

  },
  methods: {
    
  }
}
</script>

<style lang="css">
</style>
